A filename is an object which names a file. Filenames are immutable record structures with the following components:
File system: the file system object via which the named file is accessible. |
Directory: a collection of files within the file system to which the named file belongs. |
Name: the name of the file within the directory, or of a family of files, as further specified by the file type and generation components of the filename. |
Type: the type of the file (also known as ``extension''). |
Generation: a positive integer specifying a particular version or incarnation of the file. Larger generation numbers indicate newer versions. |
In general, the directory, name, and type components of a file are usually symbols, the file system component is a file system object, and the generation component is an integer. The file system component may be a symbol which names a file system in an implementation-dependent manner.
Filenames may be incompletely specified; missing components are represented by having null (false) as their value. An omitted file system is usually interpreted to be the same as the local file system, an omitted directory component means the current working directory. The name component may not be omitted.
The external representation of a filename has the form
where gen and type may be omitted, if null.